package org.example.auth.config;

import lombok.Data;
import org.example.auth.enums.CaptchaCategory;
import org.example.auth.enums.CaptchaType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 验证码 配置属性
 *
 * @author Lion Li
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "captcha")
public class CaptchaProperties {

    private Boolean enable = true;

    /**
     * 验证码类型
     */
    private CaptchaType type = CaptchaType.MATH;

    /**
     * 验证码类别
     */
    private CaptchaCategory category = CaptchaCategory.LINE;

    /**
     * 数字验证码位数
     */
    private Integer numberLength = 1;

    /**
     * 字符验证码长度
     */
    private Integer charLength = 4;

    /**
     * 验证码宽
     */
    private Integer width = 200;

    /**
     * 验证码高
     */
    private Integer height = 60;
}
